package com.ubox.mqtt_upush;

import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;

@SpringBootApplication
@ComponentScan(basePackages = { "com.ubox" })
@EnableAsync
public class MqttUpushApplication {

	// private final static Logger logger =
	// LoggerFactory.getLogger(MqttUpushApplication.class);

	private static ConfigurableApplicationContext applicationContext;

	public static ConfigurableApplicationContext getApplicationContext() {
		return applicationContext;
	}

	public static void main(String[] args) throws Exception {

		SpringApplication app = new SpringApplication(MqttUpushApplication.class);
		app.setBannerMode(Banner.Mode.OFF);
		applicationContext = app.run(args);
	}
}
